# coding:utf-8
# name ：YuFuXiao
# date : 2018-9-XX


from flask import Flask,current_app,request,Request

app = Flask(__name__)

#应用上下文  对象flask
#请求上下文  对象request
#flask  APPContext
#request RequestContext
#我们要取的对象应该怎么取，应该要出上下文取对象

# ctx = app.app_context()   #获取app_context上下文
# ctx.push()  #推入栈
with app.app_context():
    a = current_app
    d = a.config['DEBUG'] #<LocalProxy unbound>
    print(d)
# print(d)                 #RuntimeError: Working outside of application context.
# ctx.pop()  #出栈






























